package com.xyoto.takeawayUser.service.impl;

import com.xyoto.takeawayUser.mapper.CategoryMapper;
import com.xyoto.takeawayUser.service.CategoryService;
import com.xyoto.takeawayUser.utils.Result;
import com.xyoto.takeawayUser.vo.CategoryVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: 经营品类
 * @Author: 挽风
 * @Date: 2022
 * @Copyright: 2022 by 挽风
 * @Description:
 **/

@Service
@Slf4j
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    private CategoryMapper categoryMapper;

    /**
     * 获取经营品类
     * @return
     */
    @Override
    public Result getCategoryList() {
        List<CategoryVo> categoryVoList = categoryMapper.getCategoryList();
        return Result.success(categoryVoList);
    }
}
